#include <bits/stdc++.h>

using namespace std;

class MinStack {
public:
	MinStack()
	{
		aux.push(INT_MAX);
	}

	void push(int val)
	{
		data.push(val);
		if (val <= aux.top())
			aux.push(val);
	}

	void pop()
	{
		if (data.top() == aux.top())
			aux.pop();
		data.pop();
	}

	int top()
	{
		return data.top();
	}

	int getMin()
	{
		return aux.top();
	}

private:
	stack<int> data;
	stack<int> aux;
};

int main()
{
	return 0;
}

/**
 * Your MinStack object will be instantiated and called as such:
 * MinStack* obj = new MinStack();
 * obj->push(val);
 * obj->pop();
 * int param_3 = obj->top();
 * int param_4 = obj->getMin();
 */
